package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.domain.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    /**
     * @Author: czx
     * @Date: 2022/1/28
     * @Title: saveUser
     * @Description: TODO
     * @params user
     * @return int    返回类型
     */
    int saveUser(@Param("user") User user);

    /**
     * @Author: czx
     * @Date: 2022/2/9
     * @Title: getUserForList
     * @Description: TODO
     * @params size,start
     * @return User    返回类型
     */
    List<User> getUserForList(@Param("size") Integer size,@Param("start") Integer start);

    /**
     * @Author: czx
     * @Date: 2022/2/9
     * @Title: getUserForCount
     * @Description: TODO
     * @params null
     * @return Integer    返回类型
     */
    Integer getUserForCount();

    /**
     * @Author: czx
     * @Date: 2022/2/9
     * @Title: getUsers
     * @Description: TODO
     * @params null
     * @return User    返回类型
     */
    User getUsers(@Param("userId") Long userId);

    /**
     * @Author: czx
     * @Date: 2022/2/9
     * @Title: doDeleteById
     * @Description: TODO
     * @params userId
     * @return int    返回类型
     */
    int doDeleteById(Long userId);
}
